﻿@model IEnumerable<SIG.DAL.Dapper.Model.Article>
    @{ 
        int i = 0;
    }
<aside class="p-l-30 re_news">
    <h3>
        推荐新闻
    </h3>
    <ul>
        @foreach (var item in Model)
        {
            if (i == 0 && !string.IsNullOrEmpty(item.Thumbnail))
            {
                <li>
                    <a href="@Url.Action("Detail",new { id=item.Id})">
                        <figure>
                            <img src="@item.Thumbnail" alt="@item.Title"/>
                            <figcaption  class="text-center">
                                @item.Title
                            </figcaption>
                        </figure>                       
                    </a>
                </li>
            }
            else
            {
                <li>
                    <a href="@Url.Action("Detail",new { id=item.Id})">
                        @item.Title
                    </a>
                </li>
            }
            i++;

        }
    </ul>
</aside>